<%-- 
    Document   : checkbox
    Created on : 30/06/2013, 05:57:59 PM
    Author     : Carolina
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Deshabilitar y Habilitar Campos</title>
<script>
function Disable()
{
document.form.chkbox2.disabled=true;
document.form.chkbox3.disabled=true;
document.form.chkbox4.disabled=true;
document.form.chkbox5.checked=false;
}
function Enable()
{
document.form.chkbox1.checked=false;
document.form.chkbox2.disabled=false;
document.form.chkbox3.disabled=false;
document.form.chkbox4.disabled=false;
}
function Limpiar()
{
document.form.chkbox1.checked=false;
document.form.chkbox2.checked=false;
document.form.chkbox3.checked=false;
document.form.chkbox4.checked=false;
document.form.chkbox5.checked=false;
}
</script>
</head>

<body onload="Limpiar()">
<form name="form">
Primera (para deshabilitar 2da, 3ra y 4ta)
<input type=checkbox name="chkbox1"  Onclick="Disable();">
Segunda
<input type=checkbox name="chkbox2">
Tercera
<input type=checkbox name="chkbox3">
Cuarta
<input type=checkbox name="chkbox4">
Quinta (para habilitarlas)
<input type=checkbox name="chkbox5"  Onclick="Enable();">
</form>
</body>
</html>